
    var scrollToTopBox = document.getElementById('scrollToTop'); //返回按钮tap 
    scrollToTopBox.addEventListener('tap', function(e) { 
    	e.stopPropagation(); mui('#pullrefresh').pullRefresh().scrollTo(0, 0, 100);//滚动到顶部 
    	});
    //Android上监听原生滚动，iOS上监听div滚动，上拉超过一屏后显示按钮，否则隐藏，可自行在条件判断中修改
    if (mui.os.android) { 
     	window.addEventListener('scroll', function(e) {
    		if (window.pageYOffset >= window.innerHeight && scrollToTopBox.classList.contains('hide')) {
    		scrollToTopBox.classList.remove('hide');
    		}else if (window.pageYOffset < window.innerHeight && !scrollToTopBox.classList.contains('hide')) {   		
    		scrollToTopBox.classList.add('hide'); 
    	}
    	}); 
        }else { 
        	document.getElementById('pullrefresh').addEventListener('scroll', function() {
        	if (mui('#pullrefresh').pullRefresh().y <= window.innerHeight * (-1) && scrollToTopBox.classList.contains('hide')){
        	scrollToTopBox.classList.remove('hide'); 
        	}else if (mui('#pullrefresh').pullRefresh().y > window.innerHeight * (-1) && !scrollToTopBox.classList.contains('hide'))
        	{scrollToTopBox.classList.add('hide');
        }
        	}); }

